package com.his.bean;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 开诊用药明细
 * @TableName dzm_his_care_order_sub
 */
public class DzmHisCareOrderSub implements Serializable {
    /**
     * 
     */
    private Integer id;

    /**
     * 
     */
    private Integer pkgId;

    /**
     * 所属开诊id
     */
    private Integer fid;

    /**
     * 分类：0药，1附加费，2检查项目
     */
    private Boolean typeId;

    /**
     * 商品id，药品id
     */
    private Integer goodsId;

    /**
     * 药品名
     */
    private String goodsName;

    /**
     * 单剂量
     */
    private BigDecimal single;

    /**
     * 单位
     */
    private String unit;

    /**
     * 单价
     */
    private BigDecimal price;

    /**
     * 用量
     */
    private BigDecimal num;

    /**
     * 金额
     */
    private BigDecimal amount;

    /**
     * 特殊要求，备注
     */
    private String tips;

    /**
     * 排序
     */
    private Integer listorder;

    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Integer getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 
     */
    public Integer getPkgId() {
        return pkgId;
    }

    /**
     * 
     */
    public void setPkgId(Integer pkgId) {
        this.pkgId = pkgId;
    }

    /**
     * 所属开诊id
     */
    public Integer getFid() {
        return fid;
    }

    /**
     * 所属开诊id
     */
    public void setFid(Integer fid) {
        this.fid = fid;
    }

    /**
     * 分类：0药，1附加费，2检查项目
     */
    public Boolean getTypeId() {
        return typeId;
    }

    /**
     * 分类：0药，1附加费，2检查项目
     */
    public void setTypeId(Boolean typeId) {
        this.typeId = typeId;
    }

    /**
     * 商品id，药品id
     */
    public Integer getGoodsId() {
        return goodsId;
    }

    /**
     * 商品id，药品id
     */
    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    /**
     * 药品名
     */
    public String getGoodsName() {
        return goodsName;
    }

    /**
     * 药品名
     */
    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    /**
     * 单剂量
     */
    public BigDecimal getSingle() {
        return single;
    }

    /**
     * 单剂量
     */
    public void setSingle(BigDecimal single) {
        this.single = single;
    }

    /**
     * 单位
     */
    public String getUnit() {
        return unit;
    }

    /**
     * 单位
     */
    public void setUnit(String unit) {
        this.unit = unit;
    }

    /**
     * 单价
     */
    public BigDecimal getPrice() {
        return price;
    }

    /**
     * 单价
     */
    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    /**
     * 用量
     */
    public BigDecimal getNum() {
        return num;
    }

    /**
     * 用量
     */
    public void setNum(BigDecimal num) {
        this.num = num;
    }

    /**
     * 金额
     */
    public BigDecimal getAmount() {
        return amount;
    }

    /**
     * 金额
     */
    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    /**
     * 特殊要求，备注
     */
    public String getTips() {
        return tips;
    }

    /**
     * 特殊要求，备注
     */
    public void setTips(String tips) {
        this.tips = tips;
    }

    /**
     * 排序
     */
    public Integer getListorder() {
        return listorder;
    }

    /**
     * 排序
     */
    public void setListorder(Integer listorder) {
        this.listorder = listorder;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DzmHisCareOrderSub other = (DzmHisCareOrderSub) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPkgId() == null ? other.getPkgId() == null : this.getPkgId().equals(other.getPkgId()))
            && (this.getFid() == null ? other.getFid() == null : this.getFid().equals(other.getFid()))
            && (this.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId()))
            && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId()))
            && (this.getGoodsName() == null ? other.getGoodsName() == null : this.getGoodsName().equals(other.getGoodsName()))
            && (this.getSingle() == null ? other.getSingle() == null : this.getSingle().equals(other.getSingle()))
            && (this.getUnit() == null ? other.getUnit() == null : this.getUnit().equals(other.getUnit()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum()))
            && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
            && (this.getTips() == null ? other.getTips() == null : this.getTips().equals(other.getTips()))
            && (this.getListorder() == null ? other.getListorder() == null : this.getListorder().equals(other.getListorder()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPkgId() == null) ? 0 : getPkgId().hashCode());
        result = prime * result + ((getFid() == null) ? 0 : getFid().hashCode());
        result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
        result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode());
        result = prime * result + ((getGoodsName() == null) ? 0 : getGoodsName().hashCode());
        result = prime * result + ((getSingle() == null) ? 0 : getSingle().hashCode());
        result = prime * result + ((getUnit() == null) ? 0 : getUnit().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode());
        result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
        result = prime * result + ((getTips() == null) ? 0 : getTips().hashCode());
        result = prime * result + ((getListorder() == null) ? 0 : getListorder().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", pkgId=").append(pkgId);
        sb.append(", fid=").append(fid);
        sb.append(", typeId=").append(typeId);
        sb.append(", goodsId=").append(goodsId);
        sb.append(", goodsName=").append(goodsName);
        sb.append(", single=").append(single);
        sb.append(", unit=").append(unit);
        sb.append(", price=").append(price);
        sb.append(", num=").append(num);
        sb.append(", amount=").append(amount);
        sb.append(", tips=").append(tips);
        sb.append(", listorder=").append(listorder);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}